<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>DOM获取元素对象</title>
	</head>
	<body>
		<img id="light" src="img/pic_bulboff.gif" />
		<h1 id="title">悔创阿里杰克马</h1>
		<script>
			/*//通过id获取元素对象
			var light = document.getElementById("light");
			alert("我要换图片了");
			light.src = "img/pic_bulbon.gif";*/
			 
			//1.获取h1标签对象
			document.getElementById("title");
			alert("我要换内容了");
			//2.修改属性值
			title.innerHTML = "不识妻美刘强东";
		</script>
	</body>
</html>
